gtkheaderbar: add style classes to all title buttons
authorAlberts Muktupāvels <alberts.muktupavels@gmail.com>
Thu, 6 Apr 2017 08:16:12 +0000 (11:16 +0300)
committerAlberts Muktupāvels <alberts.muktupavels@gmail.com>
Thu, 6 Apr 2017 12:34:49 +0000 (15:34 +0300)
Commit b187773053098cca1b7c23e04e096d47fbb65a5f added CSS style
classes for minimize, maximize and close buttons. Add similar classes
also to icon and menu buttons.

https://bugzilla.gnome.org/show_bug.cgi?id=780944

gtk/gtkheaderbar.c

index 95c59bc2a2763d922bc24d06dc5dda9f0e9b09db..1f3130ace50b43983dbbfaf0252e190b6a5cc590 100644 (file)
@@ -352,6 +352,7 @@ _gtk_header_bar_update_window_buttons (GtkHeaderBar *bar)
                   gtk_widget_set_valign (button, GTK_ALIGN_CENTER);
                   priv->titlebar_icon = button;
                   gtk_style_context_add_class (gtk_widget_get_style_context (button), "titlebutton");
+                  gtk_style_context_add_class (gtk_widget_get_style_context (button), "icon");
                   gtk_widget_set_size_request (button, 20, 20);
                   if (!_gtk_header_bar_update_window_icon (bar, window))
                     {
@@ -369,6 +370,7 @@ _gtk_header_bar_update_window_buttons (GtkHeaderBar *bar)
                   gtk_menu_button_set_menu_model (GTK_MENU_BUTTON (button), menu);
                   gtk_menu_button_set_use_popover (GTK_MENU_BUTTON (button), TRUE);
                   gtk_style_context_add_class (gtk_widget_get_style_context (button), "titlebutton");
+                  gtk_style_context_add_class (gtk_widget_get_style_context (button), "appmenu");
                   image = gtk_image_new ();
                   gtk_container_add (GTK_CONTAINER (button), image);
                   gtk_widget_set_can_focus (button, FALSE);